Lars Ingebrigtsen [Sat, 22 Jan 2022 11:36:29 +0000 (12:36 +0100)]
Fix the prompt in hi-lock-read-face-name
* lisp/hi-lock.el (hi-lock-read-face-name): Fix the prompt after
recent changes (bug#53255).
Eli Zaretskii [Sat, 22 Jan 2022 11:59:58 +0000 (13:59 +0200)]
; * etc/NEWS: Improve entry about Outline mode changes.
Matthias Meulien [Mon, 17 Jan 2022 19:20:28 +0000 (20:20 +0100)]
Fix some doc strings in outline.el
* lisp/outline.el (outline-default-state): Fix doc string.
(outline-default-rules): Fix doc string.
Eli Zaretskii [Sat, 22 Jan 2022 11:09:31 +0000 (13:09 +0200)]
; * src/xdisp.c (Fbidi_find_overridden_directionality): Doc fix.
Lars Ingebrigtsen [Sat, 22 Jan 2022 10:56:13 +0000 (11:56 +0100)]
Make the test for existing multisession variables more sensible
* lisp/emacs-lisp/multisession.el (multisession-edit-value):
Unconfuse the code.
Eli Zaretskii [Sat, 22 Jan 2022 10:14:17 +0000 (12:14 +0200)]
; Fix last change in 'textsec-bidi-controls-suspicious-p'.
Eli Zaretskii [Sat, 22 Jan 2022 09:58:05 +0000 (11:58 +0200)]
Improve detection of suspicious uses of bidi controls
* lisp/international/textsec.el
(textsec-bidi-controls-suspicious-p): New function.
(textsec-name-suspicious-p): Use it.
* test/lisp/international/textsec-tests.el (test-suspicious-name):
Enable the test that was previously failing with
'bidi-find-overridden-directionality'.
Po Lu [Sat, 22 Jan 2022 09:51:30 +0000 (09:51 +0000)]
Prevent raw bytes from being displayed as help text on Haiku
* src/haikumenu.c (digest_menu_items): Don't set encoded text
into the menu item vector.
Po Lu [Sat, 22 Jan 2022 08:16:26 +0000 (16:16 +0800)]
Use locale coding system to decode XIM preedit text
* src/xfns.c (x_xim_text_to_utf8_unix): XIMs typically return
text in the locale coding system, so use that instead.
Eli Zaretskii [Sat, 22 Jan 2022 07:06:21 +0000 (09:06 +0200)]
Change visibility of "Undelete Frame"
* lisp/menu-bar.el (menu-bar-file-menu): Make "Undelete Frame"
always visible. Suggested by Gregory Heytings <gregory@heytings.org>.
Eli Zaretskii [Sat, 22 Jan 2022 07:03:11 +0000 (09:03 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Po Lu [Sat, 22 Jan 2022 07:01:28 +0000 (15:01 +0800)]
Get rid of some unnecessary code in handle_one_xevent
* src/xterm.c (handle_one_xevent): Stop mutating event->xkey.
Eli Zaretskii [Sat, 22 Jan 2022 06:26:54 +0000 (08:26 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Stefan Kangas [Sat, 22 Jan 2022 05:30:25 +0000 (06:30 +0100)]
; Merge from origin/emacs-28
The following commits were skipped:
fbc9b121e0 Fix memory-report-object-size to initialize memory-report-...
f08dfa9b53 Fix menu-bar mouse clicks in "C-h c" and "C-h k" (bug#53322)
Po Lu [Sat, 22 Jan 2022 02:25:06 +0000 (10:25 +0800)]
Fix recent changes to visible bell code
* src/gtkutil.c (xg_create_scroll_bar):
(xg_create_horizontal_scroll_bar): Stop ensuring an X window
before the widget is realized.
(xg_update_scrollbar_pos):
(xg_update_horizontal_scrollbar_pos): Ensure such a window here
instead.
Po Lu [Sat, 22 Jan 2022 02:12:18 +0000 (10:12 +0800)]
Clean up visible bell code on X
* src/gtkutil.c (xg_create_scroll_bar):
(xg_create_horizontal_scroll_bar): Ensure that the scroll bars
have their own X windows.
* src/xterm.c (XTflash): Remove use of GDK functions for
drawing.
Po Lu [Sat, 22 Jan 2022 01:11:33 +0000 (09:11 +0800)]
Fix crash when the visible bell is rung but there is no cairo surface
* src/pgtkterm.c (pgtk_flash): Return if the cairo surface is
not present. (bug#53420)
(pgtk_cr_update_surface_desired_size): Reformat comment.
Paul Eggert [Fri, 21 Jan 2022 22:45:57 +0000 (14:45 -0800)]
Avoid glitches in ELC lines in build output
* src/verbose.mk.in (have_working_info): New macro.
(AM_V_ELC, AM_V_ELN): Use 'echo' rather than $(info ...)
on buggy versions of GNU Make.
Paul Eggert [Fri, 21 Jan 2022 21:33:55 +0000 (13:33 -0800)]
Simplify AM_V_ELC setup
* src/verbose.mk.in (AM_V_ELC, AM_V_ELN): Use simpler Make ‘if’s.
Glenn Morris [Fri, 21 Jan 2022 21:44:56 +0000 (13:44 -0800)]
* lisp/cus-start.el (polling-period): Update type.
Flagged by test-custom-opts.
Glenn Morris [Fri, 21 Jan 2022 20:12:43 +0000 (12:12 -0800)]
* src/keyboard.c (start_polling): Fix type mixup.
Flagged by --enable-check-lisp-object-type.
Lars Ingebrigtsen [Fri, 21 Jan 2022 14:22:24 +0000 (15:22 +0100)]
Disable background image fetching from asking for passwords
* lisp/url/url-queue.el (url-queue-start-retrieve): Inhibit
prompting for passwords from these background requests.
Lars Ingebrigtsen [Fri, 21 Jan 2022 14:03:32 +0000 (15:03 +0100)]
Further emake tweaks
Lars Ingebrigtsen [Fri, 21 Jan 2022 14:00:14 +0000 (15:00 +0100)]
Fix previous emake change
* admin/emake (cores): Fix typo in previous change.
Po Lu [Fri, 21 Jan 2022 13:48:57 +0000 (21:48 +0800)]
* src/keyboard.c (syms_of_keyboard): Fix build without input polling.
Lars Ingebrigtsen [Fri, 21 Jan 2022 13:45:23 +0000 (14:45 +0100)]
Improve the completion-category-overrides doc string
* lisp/minibuffer.el (completion-category-overrides): Clarify what
this variable does (bug#22324).
(completion-category-defaults): Mention the overrides variable.
Lars Ingebrigtsen [Fri, 21 Jan 2022 13:31:11 +0000 (14:31 +0100)]
Remove text mistakenly added to the diff--iterate-hunks doc string
* lisp/vc/diff-mode.el (diff--iterate-hunks): Remove text added by
mistake to the doc string.
Lars Ingebrigtsen [Fri, 21 Jan 2022 13:20:31 +0000 (14:20 +0100)]
Followup fix to previous message-update-smtp-method-header change
* lisp/gnus/message.el (message-update-smtp-method-header): Narrow
to the headers first.
Lars Ingebrigtsen [Fri, 21 Jan 2022 13:18:19 +0000 (14:18 +0100)]
Allow From to be part of message-hidden-headers
* lisp/gnus/message.el (message-update-smtp-method-header): Don't
bug out if the From header is part of `message-hidden-headers'
(bug#52871).
Eli Zaretskii [Fri, 21 Jan 2022 12:11:22 +0000 (14:11 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Jim Porter [Fri, 21 Jan 2022 03:51:39 +0000 (19:51 -0800)]
Don't use 'eshell-eval-using-options' for 'eshell/source' or 'eshell/.'
This makes 'source' and '.' in Eshell more compatible with regular
shells, which just treat the first argument as the file to source and
all subsequent arguments as arguments to that file.
* lisp/eshell/em-script.el (eshell/source, eshell/.): Don't use
'eshell-eval-using-options'.
* etc/NEWS: Announce the change (bug#53293)
Jim Porter [Thu, 20 Jan 2022 02:59:23 +0000 (18:59 -0800)]
Raise an error from 'eval-eval-using-options' for unknown options
* lisp/eshell/em-basic.el (eshell/echo): Add -E option.
* lisp/eshell/esh-opt.el (eshell--process-option): Raise an error if
an unknown option is encountered, even when :external is nil.
* test/lisp/eshell/esh-opt-tests.el (esh-opt-process-args-test)
(test-eshell-eval-using-options): Add test cases for this.
Theodor Thornhill [Fri, 21 Jan 2022 12:04:29 +0000 (13:04 +0100)]
Fix indentation in NEWS of cl-flet item
* etc/NEWS: Correct description of indentation of 'cl-flet' and
'cl-labels (bug#53410).
Lars Ingebrigtsen [Fri, 21 Jan 2022 11:48:03 +0000 (12:48 +0100)]
Clarify Splitting Mail in the Gnus manual
* doc/misc/gnus.texi (Splitting Mail): Clarify what happens when
crossposting or not (bug#53307).
Sergey Vinokurov [Fri, 21 Jan 2022 11:42:22 +0000 (12:42 +0100)]
Fix memory-report-object-size to initialize memory-report--type-size
* lisp/emacs-lisp/memory-report.el (memory-report-object-size):
Allow using function directly (bug#53310).
Do not merge to master.
Lars Ingebrigtsen [Fri, 21 Jan 2022 11:32:10 +0000 (12:32 +0100)]
Interpret a "" value of EMACS_TEST_VERBOSE as "off"
* doc/misc/ert.texi (Running Tests in Batch Mode): Adjust doc.
* lisp/emacs-lisp/ert.el (ert-run-tests-batch): Allow overriding
the EMACS_TEST_VERBOSE variable by setting it to "" (bug#53313).
Lars Ingebrigtsen [Fri, 21 Jan 2022 11:26:30 +0000 (12:26 +0100)]
Make the edebug-all-defs user option work more reliably
* lisp/emacs-lisp/edebug.el (edebug-all-defs): This user option
has no effect unless edebug is loaded (because that loads the
advice needed for the commands in question) (bug#53331).
Po Lu [Fri, 21 Jan 2022 11:08:41 +0000 (19:08 +0800)]
Make xwidgets work on builds that don't use Cairo drawing
* configure.ac: Check for the parts of Cairo that are needed for
xwidgets when they are enabled without cairo drawing.
* src/xterm.c:
* src/xwidget.c: Always include cairo-xlib headers when xwidgets
are enabled.
Lars Ingebrigtsen [Fri, 21 Jan 2022 11:07:31 +0000 (12:07 +0100)]
Clean up mm-display-inline-fontify slightly
* lisp/gnus/mm-view.el (mm-display-inline-fontify): Remove some
left-over compat code.
Lars Ingebrigtsen [Fri, 21 Jan 2022 11:07:04 +0000 (12:07 +0100)]
Make diff--iterate-hunks more resilient
* lisp/vc/diff-mode.el (diff--iterate-hunks): Ignore malformed
hunks instead of signalling errors (bug#53343).
Shuguang Sun [Fri, 21 Jan 2022 10:25:27 +0000 (11:25 +0100)]
Use the correct converter for odf files in doc-view
* lisp/doc-view.el (doc-view-pdf/ps->png): Use the correct
converter for odf files (bug#53354).
Lars Ingebrigtsen [Fri, 21 Jan 2022 10:20:56 +0000 (11:20 +0100)]
Update multisession variables when editing the values
* lisp/emacs-lisp/multisession.el (multisession-edit-value):
Update multisession variables when editing the values (bug#53361).
Jim Porter [Fri, 21 Jan 2022 09:32:00 +0000 (10:32 +0100)]
Further improve determination of when commands can be invoked directly
This covers the case when a subcommand is to be invoked in more places
than before, for example when a subcommand is concatenated in an
argument.
* lisp/eshell/esh-cmd.el (eshell--find-subcommands): New fuction.
(eshell--invoke-command-directly): Use 'eshell-find-subcommands'.
* test/lisp/eshell/eshell-tests.el
(eshell-test/interp-cmd-external-concat): New test (bug#30725).
Eli Zaretskii [Fri, 21 Jan 2022 08:17:06 +0000 (10:17 +0200)]
; * etc/NEWS: Fix description of 'polling-period' change.
Lars Ingebrigtsen [Fri, 21 Jan 2022 07:55:43 +0000 (08:55 +0100)]
Adjust emake after recent changes
Po Lu [Fri, 21 Jan 2022 07:32:45 +0000 (15:32 +0800)]
Synchronize XI2 code with Core Input code
* src/xterm.c (handle_one_xevent): Apply recent changes for XI2
events as well.
Po Lu [Fri, 21 Jan 2022 07:27:35 +0000 (15:27 +0800)]
Merge from origin/emacs-28
11ea45c9e4 Fix UB in ebrowse
ba57b78064 Fix execute-extended-command-for-buffer in fundamental-mode
ef0c1d4c2c Add workaround to handle a problem with Enlightenment WM (...
Po Lu [Fri, 21 Jan 2022 05:49:57 +0000 (13:49 +0800)]
; * etc/NEWS: Fix typo in recent change.
Po Lu [Fri, 21 Jan 2022 05:22:51 +0000 (13:22 +0800)]
Work around GTK changing window backgrounds on colormapped displays
* src/xterm.c (x_clear_window):
(x_clear_area): Fill the contents with the reverse GC instead of
using XClearArea and XClearWindow when not double buffered.
Po Lu [Fri, 21 Jan 2022 03:37:19 +0000 (11:37 +0800)]
Fix BadValue crash when looking up empty color names on some X servers
* src/xterm.c (x_parse_color): Avoid parsing empty color names.
Dmitry Gutov [Fri, 21 Jan 2022 02:59:39 +0000 (04:59 +0200)]
ruby-toggle-block-space-before-parameters: New user option
* lisp/progmodes/ruby-mode.el (ruby-toggle-block-space-before-parameters):
New user option (bug#53321).
(ruby-do-end-to-brace): Handle it.
* test/lisp/progmodes/ruby-mode-tests.el
(ruby-toggle-block-to-brace-no-space): New test.
Po Lu [Fri, 21 Jan 2022 01:31:27 +0000 (01:31 +0000)]
Update menu bars when `use-system-tooltips' changes on Haiku
* lisp/term/haiku-win.el: Add new function as variable watcher
for `use-system-tooltips'.
(haiku-use-system-tooltips-watcher): New function.
Po Lu [Fri, 21 Jan 2022 01:15:52 +0000 (09:15 +0800)]
Allow fractional values of `polling-period'
This allows C-g to be handled faster in the NS port at the cost
of some extra CPU time on slow machines.
* etc/NEWS: Announce new feature.
* src/keyboard.c (start_polling):
(bind_polling_period): Handle floating point values of
`polling-period'.
(syms_of_keyboard): Make `polling-period' a Lisp variable
instead of an int variable.
Po Lu [Sat, 15 Jan 2022 13:11:57 +0000 (21:11 +0800)]
Avoid FOCUS_IN_EVENTS not being sent on NS
* src/nsterm.m ([EmacsView windowDidBecomeKey]): Work around
emacs_event being NULL by storing focus in events directly
into the keyboard buffer. (bug#52376)
Alan Mackenzie [Thu, 20 Jan 2022 18:40:15 +0000 (18:40 +0000)]
In early bootstrap, use byte-compiled compiler to native compile first files
This speeds up a make bootstrap by around 15%.
* lisp/Makefile.in (BYTE_COMPILE_FLAGS): set a value specific to compile-first
which doesn't contain the setting of Emacs variable load-prefer-newer.
Add a new make hunk which byte-compiles (rather then native compiles) when the
environment variable ANCIENT is "yes". Set the date of the .elc files built
to 1971-01-01 to cause a second compilation of them later.
* src/Makefile.in: Add an extra invocation of directory lisp's MAKE with
target compile-first and the flag environment variable ANCIENT set to yes.
* src/verbose.mk.in: When ANCIENT is yes, output ELC, not ELC+ELN for
AM_V_ELC.
Arash Esbati [Thu, 20 Jan 2022 18:20:34 +0000 (19:20 +0100)]
Remove matching of whitespaces in LaTeX environment names
* lisp/textmodes/ispell.el (ispell-tex-skip-alists): Don't match
arbitrary number of whitespaces in LaTeX environment names.
(bug#53390)
Eli Zaretskii [Thu, 20 Jan 2022 17:18:54 +0000 (19:18 +0200)]
Update documentation of 'clone-indirect-buffer-hook'
* doc/emacs/buffers.texi (Indirect Buffers):
* src/buffer.c (syms_of_buffer) <clone-indirect-buffer-hook>:
Update the documentation of 'clone-indirect-buffer-hook' due the
recent changes.
* etc/NEWS: Mention the change in where the hook is run.
* lisp/face-remap.el (face-attrs--make-indirect-safe): Doc fix.
Lars Ingebrigtsen [Thu, 20 Jan 2022 17:12:44 +0000 (18:12 +0100)]
Make textsec-link-suspicious-p less mistrustful
* lisp/international/textsec.el (textsec-link-suspicious-p): Scale
back the suspicion -- only warn about texts that contain a full
explicit link.
Thuna [Thu, 20 Jan 2022 14:22:22 +0000 (15:22 +0100)]
Fix tabulated-list-widen-current-column widening wrong column
* tabulated-list.el (tabulated-list-widen-current-column): Account
for the padding and the content width when calculating column
width (bug#53375).
Copyright-paperwork-exempt: yes
Peter Münster [Thu, 20 Jan 2022 14:16:46 +0000 (15:16 +0100)]
Make image-dired-delete-marked more resilient
* lisp/image-dired.el (image-dired-delete-marked): Don't bug out
on empty buffers (bug#53385).
Lars Ingebrigtsen [Thu, 20 Jan 2022 13:53:12 +0000 (14:53 +0100)]
Fix thinko in previous hi-lock-read-face-name change
* lisp/hi-lock.el (hi-lock-read-face-name): Fix the string/symbol
logic.
Andrew Hyatt [Thu, 20 Jan 2022 13:42:31 +0000 (14:42 +0100)]
Fix indirect font changes incorrectly affecting original buffer
* lisp/face-remap.el (face-attrs--make-indirect-safe):
(clone-indirect-buffer-hook): Set up a face remapping alist
(bug#53294).
* lisp/simple.el (clone-indirect-buffer): Move the point the hook
is run.
* src/buffer.c (Fmake_indirect_buffer, syms_of_buffer): Move the
place where the clone-indirect-buffer-hook variable is defined, so
that we can call it from C.
Jim Porter [Thu, 20 Jan 2022 13:37:54 +0000 (14:37 +0100)]
Consider subcommands when deciding to invoke Eshell command directly
When an Eshell command contains an asynchronous subcommand (such as
calling an external process), it must be evaluated iteratively. See
bug#30725.
* lisp/eshell/esh-cmd.el (eshell-invoke-command): Move most of the
logic from here...
(eshell--invoke-command-directly): ... to here. Also add checks for
subcommands.
* test/lisp/eshell/eshell-tests.el (eshell-test--max-subprocess-time):
New variable.
(eshell-wait-for-subprocess): New function.
(eshell-command-result-p): Use 'eshell-wait-for-subprocess'.
(eshell-test/interp-cmd-external): New test (bug#30725).
Lars Ingebrigtsen [Thu, 20 Jan 2022 13:33:36 +0000 (14:33 +0100)]
Rename the textsec-check function to textsec-suspicious-p
* lisp/net/shr.el (shr-tag-a):
* lisp/international/textsec-check.el (textsec-suspicious-p):
* lisp/gnus/message.el (message-send-mail):
* lisp/gnus/gnus-art.el (article--check-suspicious-addresses):
* etc/NEWS (like):
* doc/lispref/text.texi (Suspicious Text):
(Suspicious Text): Rename the textsec-check function to
textsec-suspicious-p.
Lars Ingebrigtsen [Thu, 20 Jan 2022 13:22:05 +0000 (14:22 +0100)]
Make the read-face-name completion buffer display samples
* lisp/faces.el (read-face-name): Display face samples when
completing (bug#53255).
* lisp/hi-lock.el (hi-lock-read-face-name): Use read-face-name.
Lars Ingebrigtsen [Thu, 20 Jan 2022 12:37:26 +0000 (13:37 +0100)]
Improve the textsec-domain-suspicious-p warning message
* lisp/international/textsec.el (textsec-domain-suspicious-p):
Improve warning message.
Po Lu [Thu, 20 Jan 2022 12:18:29 +0000 (20:18 +0800)]
Fix error when describing menu items that don't have equivalent keys
* lisp/help-fns.el (help-fns--key-bindings): Never pass nil to
insert.
Stefan Monnier [Mon, 22 Nov 2021 19:23:26 +0000 (14:23 -0500)]
Fix menu-bar mouse clicks in "C-h c" and "C-h k" (bug#53322)
* lisp/subr.el (event-start, event-end): Handle '(menu-bar)'
events.
* lisp/net/browse-url.el (browse-url-interactive-arg): Simplify
accordingly.
(cherry picked from commit
9ceb3070e34ad8a54184fd0deda477bf5ff77000)
Eli Zaretskii [Thu, 20 Jan 2022 11:42:56 +0000 (13:42 +0200)]
Fix UB in ebrowse
* lib-src/ebrowse.c (matching_regexp): Avoid writing beyond the
limits of 'matching_regexp_buffer'. Patch by Jan Stranik
<jan@stranik.org>. (Bug#53333)
Copyright-paperwork-exempt: yes
Lars Ingebrigtsen [Thu, 20 Jan 2022 11:37:31 +0000 (12:37 +0100)]
Make textsec-link-suspicious-p have fewer false positives
* lisp/international/textsec.el (textsec-link-suspicious-p):
Attempt to improve the domain-guessing logic.
Lars Ingebrigtsen [Thu, 20 Jan 2022 11:03:49 +0000 (12:03 +0100)]
Improve how menus are described in *Help*
* lisp/help-fns.el (help-fns--insert-bindings): New function.
(help-fns--key-bindings): Split menu/key handling and output menu
bindings separately (bug#52870).
Po Lu [Thu, 20 Jan 2022 10:53:49 +0000 (10:53 +0000)]
Make system tooltips display in the menu bar on Haiku
* doc/emacs/haiku.texi (Haiku Basics): Update documentation.
* src/haiku_support.cc (Highlight): Apply the hack used for
regular menus to the menu bar as well.
* src/haikumenu.c (digest_menu_items): Set help text on menu bar
if `tooltip-mode' is t and system tooltips are used.
(syms_of_haikumenu): New symbol `tooltip-mode'.
Mattias Engdegård [Sun, 16 Jan 2022 10:58:00 +0000 (11:58 +0100)]
Fix Fchar_syntax for non-ASCII in unibyte buffers
Fchar_syntax did not convert unibyte characters to multibyte when the
current buffer was unibyte, in contrast to `char-syntax` in
byte-compiled code (bug#53260).
* src/bytecode.c (exec_byte_code): Call out to Fchar_syntax;
the dynamic frequency is too low to justify inlining here, and it
did lead to implementations diverging.
* src/syntax.c (Fchar_syntax): Convert non-ASCII unibyte values to
multibyte.
* test/src/syntax-tests.el (syntax-char-syntax): New test.
Lars Ingebrigtsen [Thu, 20 Jan 2022 10:06:58 +0000 (11:06 +0100)]
Re-enable some textsec-tests after recent bidi.c fix
Jim Porter [Thu, 20 Jan 2022 09:35:38 +0000 (10:35 +0100)]
In Eshell, allow "-n" to suppress the trailing newline for "plain" echo
* doc/misc/eshell.texi (Built-in commands): Expand on the
documentation of echo (bug#27361).
* lisp/eshell/em-basic.el (eshell-echo): Respect OUTPUT-NEWLINE even
when 'eshell-plain-echo-behavior' is non-nil.
(eshell/echo): Add "-N" option and recommend its use over "-n" in
Lisp-friendly echo.
(eshell/printnl): Simplify; 'eshell-stringify' is equivalent to
calling 'eshell-echo' here.
Eli Zaretskii [Thu, 20 Jan 2022 10:02:27 +0000 (12:02 +0200)]
Fix 'bidi-find-overridden-directionality' for Lisp strings
* src/bidi.c (bidi_find_first_overridden): Don't use ZV for Lisp
strings. Reported by Lars Ingebrigtsen <larsi@gnus.org>.
Lars Ingebrigtsen [Thu, 20 Jan 2022 10:00:26 +0000 (11:00 +0100)]
Fix execute-extended-command-for-buffer in fundamental-mode
* lisp/simple.el (execute-extended-command-for-buffer): Protect
against the current local map being nil (bug#52907).
Po Lu [Thu, 20 Jan 2022 09:55:07 +0000 (17:55 +0800)]
Make the undelete-frame-mode menu item a toggle
* lisp/menu-bar.el (menu-bar-file-menu): Make the undelete frame
mode option a toggle. (bug#53382)
Also enable some options that were disabled on NS, but should no
longer be since NS now supports the tab bar.
Martin Rudalics [Thu, 20 Jan 2022 09:30:08 +0000 (10:30 +0100)]
Add workaround to handle a problem with Enlightenment WM (Bug#53298)
* src/xterm.c (handle_one_xevent): Handle setting of variable
'x_set_frame_visibility_more_laxly' when receiving an Expose or
FocusIn event (Bug#53298).
(Qexpose): Define symbol.
(x_set_frame_visibility_more_laxly): New Lisp variable.
* etc/PROBLEMS: Mention frame redraw problem with the
Enlightenment WM and 'x-set-frame-visibility-more-laxly'
workaround.
Lars Ingebrigtsen [Thu, 20 Jan 2022 09:19:23 +0000 (10:19 +0100)]
Make key-valid-p work in Turkey
* lisp/keymap.el (key-valid-p): Inhibit case folding, otherwise
(key-valid-p "I") would return nil in tr_TR environments.
Lars Ingebrigtsen [Thu, 20 Jan 2022 09:10:01 +0000 (10:10 +0100)]
Tweak textsec-link-suspicious-p
* lisp/international/textsec.el (textsec-link-suspicious-p): Don't
mark dates as suspicious.
Lars Ingebrigtsen [Thu, 20 Jan 2022 08:54:38 +0000 (09:54 +0100)]
Add test for bug#51733
Eli Zaretskii [Thu, 20 Jan 2022 09:04:41 +0000 (11:04 +0200)]
Improve documentation of textsec
* lisp/international/textsec-check.el (textsec-check): Doc fixes.
* doc/lispref/text.texi (Suspicious Text): Improve wording and
indexing.
Lars Ingebrigtsen [Thu, 20 Jan 2022 08:52:08 +0000 (09:52 +0100)]
Allow suspicious names with some forms of bidi controls
* lisp/international/textsec.el (textsec-name-suspicious-p): Allow
names with bidi-find-overridden-directionality.
Lars Ingebrigtsen [Thu, 20 Jan 2022 08:36:04 +0000 (09:36 +0100)]
Improve textsec-domain-suspicious-p message
* lisp/international/textsec.el (textsec-domain-suspicious-p):
Improve warning message.
Eli Zaretskii [Thu, 20 Jan 2022 08:05:05 +0000 (10:05 +0200)]
Allow disabling 'undelete-frame-mode' from the menu bar
* lisp/menu-bar.el (menu-bar-file-menu): Add
'disable-undelete-frame-mode' menu item. (Bug#53382)
Lars Ingebrigtsen [Thu, 20 Jan 2022 07:38:16 +0000 (08:38 +0100)]
Document textsec
* doc/lispref/elisp.texi (Top): Add menu.
* doc/lispref/text.texi (Text): Add menu.
(Suspicious Text): New node.
* lisp/international/textsec-check.el (textsec-check): Adjust doc
string.
Lars Ingebrigtsen [Thu, 20 Jan 2022 07:01:20 +0000 (08:01 +0100)]
Check link text domain suspiciousness
* lisp/international/textsec.el (textsec-link-suspicious-p): Check
whether the domain in the link text is suspicious.
Lars Ingebrigtsen [Thu, 20 Jan 2022 06:57:13 +0000 (07:57 +0100)]
Expand textsec-link-suspicious-p checking
* lisp/international/textsec.el (textsec-link-suspicious-p): Check
the text more thoroughly for link-like things.
Lars Ingebrigtsen [Thu, 20 Jan 2022 06:45:33 +0000 (07:45 +0100)]
Improve textsec-domain-suspicious-p message
* lisp/international/textsec.el (textsec-domain-suspicious-p):
Ensure that we're not confusing the user if there's a directional
override in the string we're checking.
Lars Ingebrigtsen [Thu, 20 Jan 2022 06:44:49 +0000 (07:44 +0100)]
Add new bidi-string-strip-control-characters function
* lisp/international/characters.el
(bidi-string-strip-control-characters): New function.
Lars Ingebrigtsen [Thu, 20 Jan 2022 05:42:56 +0000 (06:42 +0100)]
Make article--check-suspicious-addresses more resilient
* lisp/gnus/gnus-art.el (article--check-suspicious-addresses): Be
more resilient to junk in headers. (But all this should be rewritten
eventually, because the entire process is way too convoluted.)
Po Lu [Thu, 20 Jan 2022 05:06:51 +0000 (13:06 +0800)]
Make `nil' values of the `:position' underline property work correctly
* src/xfaces.c (Finternal_set_lisp_face_attribute): Handle cases
where the underline property `:position' is nil.
Po Lu [Thu, 20 Jan 2022 03:27:17 +0000 (11:27 +0800)]
Port hourglass display to XCB
* src/xterm.c (x_show_hourglass):
(x_hide_hourglass): Use straightforward translations to XCB if
available.
Po Lu [Thu, 20 Jan 2022 02:48:25 +0000 (10:48 +0800)]
Get rid of calls to XRenderQueryExtension after terminal initialization
* src/image.c (x_create_xrender_picture):
(Fimage_transforms_p): Use `xrender_supported_p'.
* src/xterm.c (x_term_init): Query for XRender support and
extension versions.
* src/xterm.h (struct x_display_info): New fields
`xrender_supported_p', `xrender_major' and `xrender_minor'.
Po Lu [Thu, 20 Jan 2022 01:01:52 +0000 (01:01 +0000)]
Implement selection ownership on Haiku
* lisp/term/haiku-win.el (haiku-selection-owner-p): New
declaration.
(gui-backend-selection-owner-p): Implement using newly exposed
primitive.
* src/haiku_select.cc
(count_clipboard, count_primary, count_secondary): New
variables for tracking selection ownership.
(BClipboard_set_system_data):
(BClipboard_set_primary_selection_data):
(BClipboard_set_secondary_selection_data): Set ownership
variables.
(BClipboard_owns_clipboard):
(BClipboard_owns_primary):
(BClipboard_owns_secondary): New functions.
* src/haikuselect.c (Fhaiku_selection_owner_p): New function.
(syms_of_haikuselect): Define new subr.
* src/haikuselect.h: New prototypes.
Andrea Corallo [Wed, 19 Jan 2022 20:07:00 +0000 (21:07 +0100)]
Suspend temp .elc production when native compiling till when necessary
* lisp/emacs-lisp/bytecomp.el (byte-to-native-output-buffer-file):
Rename from `byte-to-native-output-file'.
(byte-write-target-file): Update.
(byte-compile-file): Write the temporary .elc only when not native
compiling.
(byte-compile-file): Kill the .elc buffer only when not native
compiling.
* lisp/emacs-lisp/comp.el (batch-byte+native-compile): Instead of just
renaming the temporary .elc make use of `byte-write-target-file' to
write it down and kill the temporary buffer.
Andrea Corallo [Wed, 19 Jan 2022 19:44:12 +0000 (20:44 +0100)]
* Move some code in in `byte-write-target-file'.
* lisp/emacs-lisp/bytecomp.el (byte-write-target-file): New function
spilling code from `byte-compile-file'.
Lars Ingebrigtsen [Wed, 19 Jan 2022 18:44:29 +0000 (19:44 +0100)]
Make article--check-suspicious-addresses more resilient
* lisp/gnus/gnus-art.el (article--check-suspicious-addresses):
Don't bug out on mbox-less addresses.
Lars Ingebrigtsen [Wed, 19 Jan 2022 18:10:45 +0000 (19:10 +0100)]
Tweak the previous suspicious Message change
* lisp/gnus/message.el (message-check-recipients)
(message-send-mail): Move the check to after encoding.